const { ccclass, property, disallowMultiple, menu } = cc._decorator;

@ccclass
@disallowMultiple
@menu("Framework/基础组件/Tip")
export default class Tip extends cc.Component {

    @property(cc.RichText)
    richText:cc.RichText=null;
    initTipUI(args){
        let str='';
        for(let i=0;i<args.length;i++){
            str+="<color="+args[i].color+">"+args[i].label;
        }
        this.richText.string =str+"</color>";
        this.node.scale = 0.3;
        //this.node.runAction(cc.sequence(cc.moveBy(0.7, 0, 100).easing(cc.easeBackOut()), cc.fadeOut(0.7), cc.removeSelf()));
        this.node.runAction(cc.sequence(cc.scaleTo(0.2, 1, 1), cc.delayTime(0.5), cc.moveBy(0.5, 0, 50).easing(cc.easeBackOut()), cc.fadeOut(0.2), cc.removeSelf()));
    }
}
